home *** CD-ROM | disk | FTP | other *** search
- /* realmath */
-
- #include <stdio.h>
- #include <time2.h>
-
-
- main()
- {
- int i;
- float x,y;
- clock_t start, end;
-
- start=clock();
-
- x = 0.0;
- y = 9.9;
- printf("start\n");
- for (i=0;i<1000;i++)
- x = x + (y*y-y)/y;
- end=clock();
- printf("Finish %f \n",x);
- printf("The timing for this RMATH test, \n");
- printf("which tests floating point multiplication performance, was: %f \n", (end-start) / CLK_TCK);
- }
-